<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>瀑布流布局-column</title>
  <style>
    /*第二步：使用 column 多行布局实现瀑布流
    column 实现瀑布流主要依赖两个属性。
    column-count 属性，是控制屏幕分为多少列。
    column-gap 属性，是控制列与列之间的距离。 */
    .box {
          margin: 10px auto;
          column-count: 3;
          column-gap: 10px;
          width: 50%;
      }
      .item {
          margin-bottom: 10px;
      }
      .item img{
          width: 100%;
          height:100%;
      }
  </style>
</head>
<body>
  <!--第一步：先写一个存放图片的DIV -->
  <div class="box">
    <div class="item">
      <img  src="https://inews.gtimg.com/newsapp_bt/0/14195643869/1000" alt="1" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202105/29/20210529013221_b9d9a.thumb.1000_0.jpg" alt="2" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202012/19/20201219095052_26f34.thumb.1000_0.jpeg" alt="3" />
    </div>
    <div class="item">
      <img  src="https://inews.gtimg.com/newsapp_bt/0/14195643869/1000" alt="1" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202105/29/20210529013221_b9d9a.thumb.1000_0.jpg" alt="2" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202012/19/20201219095052_26f34.thumb.1000_0.jpeg" alt="3" />
    </div>
    <div class="item">
      <img  src="https://inews.gtimg.com/newsapp_bt/0/14195643869/1000" alt="1" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202105/29/20210529013221_b9d9a.thumb.1000_0.jpg" alt="2" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202012/19/20201219095052_26f34.thumb.1000_0.jpeg" alt="3" />
    </div>
    <div class="item">
      <img  src="https://inews.gtimg.com/newsapp_bt/0/14195643869/1000" alt="1" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202105/29/20210529013221_b9d9a.thumb.1000_0.jpg" alt="2" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202012/19/20201219095052_26f34.thumb.1000_0.jpeg" alt="3" />
    </div>
    <div class="item">
      <img  src="https://inews.gtimg.com/newsapp_bt/0/14195643869/1000" alt="1" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202105/29/20210529013221_b9d9a.thumb.1000_0.jpg" alt="2" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202012/19/20201219095052_26f34.thumb.1000_0.jpeg" alt="3" />
    </div>
    <div class="item">
      <img  src="https://inews.gtimg.com/newsapp_bt/0/14195643869/1000" alt="1" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202105/29/20210529013221_b9d9a.thumb.1000_0.jpg" alt="2" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202012/19/20201219095052_26f34.thumb.1000_0.jpeg" alt="3" />
    </div>
    <div class="item">
      <img  src="https://inews.gtimg.com/newsapp_bt/0/14195643869/1000" alt="1" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202105/29/20210529013221_b9d9a.thumb.1000_0.jpg" alt="2" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202012/19/20201219095052_26f34.thumb.1000_0.jpeg" alt="3" />
    </div>
    <div class="item">
      <img  src="https://inews.gtimg.com/newsapp_bt/0/14195643869/1000" alt="1" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202105/29/20210529013221_b9d9a.thumb.1000_0.jpg" alt="2" />
    </div>
    <div class="item">
      <img  src="https://c-ssl.dtstatic.com/uploads/blog/202012/19/20201219095052_26f34.thumb.1000_0.jpeg" alt="3" />
    </div>
  </div>
</body>
</html>